

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show Event</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><g:link class="home" controller="event"  action="home">Home</g:link></span>
            <span class="menuButton"><g:link class="list" action="list">Event List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Event</g:link></span>
            <span class="menuButton"><g:link controller="user" action="logout">Logout</g:link></span>
        </div>
        <div class="body">
            <h1>Show Event</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>

                        <tr class="prop">
                            <td valign="top" class="name">Name:</td>

                            <td valign="top" class="value">${event.name}</td>

                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name">Description:</td>

                            <td valign="top" class="value">${event.description}</td>

                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name">Coordinator:</td>
                            
                            <td valign="top" class="value"><g:link controller="user" action="show" id="${event?.coordinator?.id}">${event?.coordinator?.name}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Date:</td>
                            
                            <td valign="top" class="value"><g:formatDate format="MM/dd/yyyy" date="${event.date}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Date Created:</td>
                            
                            <td valign="top" class="value"><g:formatDate format="MM/dd/yyyy" date="${event.dateCreated}" /></td>
                            
                        </tr>

                        <tr class="prop">
                            <td valign="top" class="name">Positions:</td>
                            
                            <td  valign="top" style="text-align:left;" class="value">
                                <g:if test="${event.positiones}">
                                    <ul>
                                    <g:each var="p" in="${event.positiones}">
                                        <li><g:link controller="positione" action="show" id="${p.id}">${p}</g:link></li>
                                    </g:each>
                                    </ul>
                                </g:if>
                                 <g:else>
                                 None. <g:link controller="positione" params="['event.id':event?.id]" action="create">Add Position</g:link>
                                 </g:else>
                            </td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <input type="hidden" name="id" value="${event?.id}" />
                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
